﻿using System;
namespace GrayParrot.Core.ServiceBus
{
    public interface ISubscriber<T>
    {
        event EventHandler<Exception> OnConnectionFailed;
        event EventHandler OnStarted;
        event EventHandler OnStopped;

        void Dispose();
        void Init();
        bool ReadDL { get; set; }
        bool Receive(T message);
        void RequestStop();
        void StartListen();
    }
}
